<?php


namespace app\controllers;


use app\service\UserService;
use yii\helpers\Json;

class UserDelController extends BaseJsonController
{
    public function doService($req, $userInfo)
    {
        $service = new UserService();
        $post = @file_get_contents('php://input');
        $userIdList = Json::decode($post);
        foreach ($userIdList as $userId) {
             $service->delete($userId);
        }
        return "ok";
    }



    protected function permissionName()
    {
        return "sys/user/delete";
    }

}